package com.hirisun.wicket.tab;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.Model;

public class TabPage extends WebPage {
	
	
	List< AbstractTab> list = new ArrayList<AbstractTab>();
	
	
	public TabPage() {
		// TODO Auto-generated constructor stub
		list.add(new AbstractTab(new Model<String>("第一个tab")) {
			
			@Override
			public WebMarkupContainer getPanel(String arg0) {
				// TODO Auto-generated method stub
				return  new TabPanel1(arg0, "第一个tab");
			}
		});
		
		list.add(new AbstractTab(new Model<String>("第二个tab")) {
			
			@Override
			public WebMarkupContainer getPanel(String arg0) {
				// TODO Auto-generated method stub
				return   new TabPanel1(arg0, "第二个tab");
			}
		});

		TabbedPanel tabPanel = new TabbedPanel("tabs", list);
		add(tabPanel);
		
	}

}
